package io.renren.modules.work.service.impl;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.work.dao.ScSignDao;
import io.renren.modules.work.entity.ScSignEntity;
import io.renren.modules.work.service.ScSignService;


@Service("scSignService")
public class ScSignServiceImpl extends ServiceImpl<ScSignDao, ScSignEntity> implements ScSignService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper<ScSignEntity> scSignEntityQueryWrapper = new QueryWrapper<>();
        if(StringUtils.isNotBlank((String) params.get("projectdtlid"))){
            scSignEntityQueryWrapper.eq("projectdtlid",params.get("projectdtlid"));
        }
        IPage<ScSignEntity> page = this.page(
                new Query<ScSignEntity>().getPage(params),
                scSignEntityQueryWrapper
        );

        return new PageUtils(page);
    }

}